package com.learn.demo.service.impl;

import com.learn.demo.service.TestAsyncAndTransactionalService;
import com.learn.demo.service.TestAsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * TestAsyncAndTransactionalServiceImpl
 *
 * @author banjiawei
 * @date 2022/01/10
 */
@Service
public class TestAsyncAndTransactionalServiceImpl implements TestAsyncAndTransactionalService {

    @Autowired
    private TestAsyncService testAsyncService;

    @Override
    @Async
    public void testAsyncAndTransactional() {
        testAsyncService.insertTestAB();
    }
}
